<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Title</title>
	<script src="lib/axios.min.js"></script>
</head>
<body>
	<button>发送请求</button>
</body>
<script>
	const btn = document.querySelector("button");
	btn.onclick = function(){
		const a1 = axios.get("http://zhangpeiyue.com/scoreList/1");
		const a2 = axios.get("http://zhangpeiyue.com/scoreList/2");
		const a3 = axios.get("http://zhangpeiyue.com/scoreList/3");
		const a4 = axios.get("http://zhangpeiyue.com/scoreList/4");
		// axios.all([a1,a2,a3,a4]).then(axios.spread(function(r1,r2,r3,r4){
		// 	console.log(r1);
		// 	console.log(r2);
		// 	console.log(r3);
		// 	console.log(r4);
		// }))
		
		function spread(cb){
			return function(value){
				cb.apply(null,value);
			}
		}
		Promise.all([a1,a2,a3,a4]).then(spread(function(s1,s2,s3,s4){
			console.log(s1,s2,s3,s4)
		}))
		
		
	}
</script>
</html>